updated Tests and re-wrote procedural