completed algorithm for first come first serve, still needs print
added print statments to first come first serve