reorganization of code so the official implementaion is in ruby now