add solution for partial function