trying to implement a scheme