Added makepass function