minor changes and tried different methods