Final version - as small as I could make it