updated functionality and styles