final commit; finishing backend logic