removed most functions from document ready func