finished up preliminary version of PS1