functions implemented. Need to handle user input more solid!