updated functions for assignment