some messy php just there