adjusted functionality of accordion