reworked to suite my needs. no more jquery.