refactored prototypes
resolve merge conflicts