css edited to function