implimented more built in rails functions and shows errors if name is empty