rough first version of codeship script