Not very nice but got the job done.