added maxout code