Completed all of the functions. Margin need to be modified.