Please check for the errors and warnings. You've missed bracket and curly braces... this is why, always consider using a library