basic implementation of logic for this assignment