cleaned up p27 c/php solutions